3.188 \(\int \left (a+b x^n\right ) \left (c+d x^n\right ) \, dx\)

Optimal. Leaf size=40 \[ \frac{x^{n+1} (a d+b c)}{n+1}+a c x+\frac{b d x^{2 n+1}}{2 n+1} \]

[Out]

a*c*x + ((b*c + a*d)*x^(1 + n))/(1 + n) + (b*d*x^(1 + 2*n))/(1 + 2*n)

_______________________________________________________________________________________

Rubi [A]  time = 0.05853, antiderivative size = 40, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 1, integrand size = 15, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.067 \[ \frac{x^{n+1} (a d+b c)}{n+1}+a c x+\frac{b d x^{2 n+1}}{2 n+1} \]

Antiderivative was successfully verified.

[In]  Int[(a + b*x^n)*(c + d*x^n),x]

[Out]

a*c*x + ((b*c + a*d)*x^(1 + n))/(1 + n) + (b*d*x^(1 + 2*n))/(1 + 2*n)

_______________________________________________________________________________________

Rubi in Sympy [F]  time = 0., size = 0, normalized size = 0. \[ \frac{b d x^{2 n + 1}}{2 n + 1} + c \int a\, dx + \frac{x^{n + 1} \left (a d + b c\right )}{n + 1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((a+b*x**n)*(c+d*x**n),x)

[Out]

b*d*x**(2*n + 1)/(2*n + 1) + c*Integral(a, x) + x**(n + 1)*(a*d + b*c)/(n + 1)

_______________________________________________________________________________________

Mathematica [A]  time = 0.0829009, size = 37, normalized size = 0.92 \[ x \left (\frac{x^n (a d+b c)}{n+1}+a c+\frac{b d x^{2 n}}{2 n+1}\right ) \]

Antiderivative was successfully verified.

[In]  Integrate[(a + b*x^n)*(c + d*x^n),x]

[Out]

x*(a*c + ((b*c + a*d)*x^n)/(1 + n) + (b*d*x^(2*n))/(1 + 2*n))

_______________________________________________________________________________________

Maple [A]  time = 0.012, size = 43, normalized size = 1.1 \[ acx+{\frac{ \left ( ad+bc \right ) x{{\rm e}^{n\ln \left ( x \right ) }}}{1+n}}+{\frac{bdx \left ({{\rm e}^{n\ln \left ( x \right ) }} \right ) ^{2}}{1+2\,n}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((a+b*x^n)*(c+d*x^n),x)

[Out]

a*c*x+(a*d+b*c)/(1+n)*x*exp(n*ln(x))+b*d/(1+2*n)*x*exp(n*ln(x))^2

_______________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \[ \text{Exception raised: ValueError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((b*x^n + a)*(d*x^n + c),x, algorithm="maxima")

[Out]

Exception raised: ValueError

_______________________________________________________________________________________

Fricas [A]  time = 0.249835, size = 93, normalized size = 2.32 \[ \frac{{\left (b d n + b d\right )} x x^{2 \, n} +{\left (b c + a d + 2 \,{\left (b c + a d\right )} n\right )} x x^{n} +{\left (2 \, a c n^{2} + 3 \, a c n + a c\right )} x}{2 \, n^{2} + 3 \, n + 1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((b*x^n + a)*(d*x^n + c),x, algorithm="fricas")

[Out]

((b*d*n + b*d)*x*x^(2*n) + (b*c + a*d + 2*(b*c + a*d)*n)*x*x^n + (2*a*c*n^2 + 3*
a*c*n + a*c)*x)/(2*n^2 + 3*n + 1)

_______________________________________________________________________________________

Sympy [A]  time = 1.31153, size = 236, normalized size = 5.9 \[ \begin{cases} a c x + a d \log{\left (x \right )} + b c \log{\left (x \right )} - \frac{b d}{x} & \text{for}\: n = -1 \\a c x + 2 a d \sqrt{x} + 2 b c \sqrt{x} + b d \log{\left (x \right )} & \text{for}\: n = - \frac{1}{2} \\\frac{2 a c n^{2} x}{2 n^{2} + 3 n + 1} + \frac{3 a c n x}{2 n^{2} + 3 n + 1} + \frac{a c x}{2 n^{2} + 3 n + 1} + \frac{2 a d n x x^{n}}{2 n^{2} + 3 n + 1} + \frac{a d x x^{n}}{2 n^{2} + 3 n + 1} + \frac{2 b c n x x^{n}}{2 n^{2} + 3 n + 1} + \frac{b c x x^{n}}{2 n^{2} + 3 n + 1} + \frac{b d n x x^{2 n}}{2 n^{2} + 3 n + 1} + \frac{b d x x^{2 n}}{2 n^{2} + 3 n + 1} & \text{otherwise} \end{cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((a+b*x**n)*(c+d*x**n),x)

[Out]

Piecewise((a*c*x + a*d*log(x) + b*c*log(x) - b*d/x, Eq(n, -1)), (a*c*x + 2*a*d*s
qrt(x) + 2*b*c*sqrt(x) + b*d*log(x), Eq(n, -1/2)), (2*a*c*n**2*x/(2*n**2 + 3*n +
 1) + 3*a*c*n*x/(2*n**2 + 3*n + 1) + a*c*x/(2*n**2 + 3*n + 1) + 2*a*d*n*x*x**n/(
2*n**2 + 3*n + 1) + a*d*x*x**n/(2*n**2 + 3*n + 1) + 2*b*c*n*x*x**n/(2*n**2 + 3*n
 + 1) + b*c*x*x**n/(2*n**2 + 3*n + 1) + b*d*n*x*x**(2*n)/(2*n**2 + 3*n + 1) + b*
d*x*x**(2*n)/(2*n**2 + 3*n + 1), True))

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.213836, size = 126, normalized size = 3.15 \[ \frac{2 \, a c n^{2} x + b d n x e^{\left (2 \, n{\rm ln}\left (x\right )\right )} + 2 \, b c n x e^{\left (n{\rm ln}\left (x\right )\right )} + 2 \, a d n x e^{\left (n{\rm ln}\left (x\right )\right )} + 3 \, a c n x + b d x e^{\left (2 \, n{\rm ln}\left (x\right )\right )} + b c x e^{\left (n{\rm ln}\left (x\right )\right )} + a d x e^{\left (n{\rm ln}\left (x\right )\right )} + a c x}{2 \, n^{2} + 3 \, n + 1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((b*x^n + a)*(d*x^n + c),x, algorithm="giac")

[Out]

(2*a*c*n^2*x + b*d*n*x*e^(2*n*ln(x)) + 2*b*c*n*x*e^(n*ln(x)) + 2*a*d*n*x*e^(n*ln
(x)) + 3*a*c*n*x + b*d*x*e^(2*n*ln(x)) + b*c*x*e^(n*ln(x)) + a*d*x*e^(n*ln(x)) +
 a*c*x)/(2*n^2 + 3*n + 1)